---@class IconUtil
IconUtil = {}
local HERO_ICON_URL = "ui://AtlasHero/"

function IconUtil.GetHeroSmallIconUrl(heroId)
    local cfg = DataTable.GetById("t_heroresources",heroId)
    if not cfg then
        logError("找不到t_heroresources id:"..tostring(heroId))
        return ""
    end
    return HERO_ICON_URL..cfg.f_CardsSmall
end

function IconUtil.GetHeroCardIconUrl(heroId)
    local cfg = DataTable.GetById("t_heroresources",heroId)
    if not cfg then
        logError("找不到t_heroresources id:"..tostring(heroId))
        return ""
    end
    return HERO_ICON_URL..cfg.f_Cards
end

function IconUtil.GetHeroBigIconUrl(heroId)
    local cfg = DataTable.GetById("t_heroresources",heroId)
    if not cfg then
        return ""
    end
    return HERO_ICON_URL..cfg.f_VerticalDrawing
end

function IconUtil.GetCharactorDeckIconUrl(heroId)
    local cfg = DataTable.GetById("t_heroresources",heroId)
    if not cfg then
        return ""
    end
    return HERO_ICON_URL..cfg.f_HeroPortrait
end
